<?
require_once "../php/Context.php";
require_once "../php/AdminInit.php";
if(!$admin->isAuthorize())
    echo "<script>document.location.href='../Admin.php';</script>";
?>
<!DOCTYPE HTML>
<html lang="en" ng-app="MainModule">
<head>
    <title>Home page</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link href="../css/style.css" rel="stylesheet" type="text/css" media="all"/>
    <link rel="stylesheet" href="../css/bootstrap.min.css"/>
    <style>
        .header_bottom{
            width:430px;
            margin-left: 350px;
            margin-top: 50px;
        }
        .header h1{
            position: relative;
            top:30px;
            left: 350px;
        }
        .menu{
            height: 50px;
        }
        .category_table th{
            text-align: center;
            font-weight: bold;
            font-size: 20px;
        }
        .title_category{
            font-weight: bold;
            position: relative;

        }
        .category_add {

        }
        .my_alert{
            width:220px;
        }
        .container{
            width: 1500px;
        }
    </style>
</head>
<body>
<div class="wrap">

    <div class="header">
        <h1>>>>>Pages on the site:<<<<</h1>
        <div class="header_bottom">
            <div class="menu">
                <ul>
                    <li><a href="Admin.php">Home</a></li>
                    <li ><a href="Product.php">Products</a></li>
                    <li><a href="News.php">News</a></li>
                    <li class="active"><a href="Contact.php">Contact</a></li>
                    <div class="clear"></div>
                </ul>
            </div>

            <div class="clear"></div>
        </div>
    </div>

    <div class="admin_panel" ng-controller="AdminCtrl">
        <div class="container">
            <div class="row">
                <div class="col-lg-5">

                    <h1>Our messages</h1>
                    <table class="table table-striped category_table" >
                        <thead>
                        <tr>
                            <th class="test">#</th>
                            <th>Name</th>
                            <th>Email</th>
                            <th>CompanyName</th>
                            <th>Message</th>
                            <th></th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr ng-repeat="msg in ContactInfo track by $index">
                            <th scope="row"><input type="text" class="form-control" value="{{msg.Id}}" disabled /> </th>
                            <td><input class="form-control" type="text"  ng-disabled="enableNews!=$index" ng-model="msg.Name" /></td>
                            <td><input class="form-control" type="text"  ng-disabled="enableNews!=$index" ng-model="msg.Email" /></td>
                            <td><input class="form-control" type="text"  ng-disabled="enableNews!=$index" ng-model="msg.CompanyName" /></td>
                            <td><input class="form-control" type="text"  ng-disabled="enableNews!=$index" ng-model="msg.Subject" /></td>
                            <td><a ng-click="DeleteMsg(msg)" class="btn btn-success" style="cursor: pointer">Delete</a></td>

                        </tr>

                        </tbody>
                    </table>



                </div>
            </div>
        </div>
    </div>
    <script type="text/javascript" src="../js/jquery-2.1.3.min.js"></script>
    <script type="text/javascript" src="../js/angular.js"></script>
    <script type="text/javascript" src="/js/AngularControllers/AdminCtrl.js"></script>
    <script type="text/javascript" src="/js/AngularControllers/SliderCtrl.js"></script>
    <script type="text/javascript" src="/js/AngularControllers/ReadMoreCtrl.js"></script>
    <script type="text/javascript" src="/js/angularModules/mainModule.js"></script>
</body>
</html>

